--- @param extension Package
--- @param HY HY_Utility
--- @param U Utility
return function(extension, HY, U)
    local hy_kawashiro_nitori = General:new(extension, "hy_kawashiro_nitori", "jin_k", 3, 3, General.Female)
    local camouflage = fk.CreateSkill {
        name = "camouflage",
    }
    camouflage:addEffect(fk.DetermineDamageInflicted, {
        anim_type = "defensive",
        times = function(self, player)
            return 2 - player:usedSkillTimes(camouflage.name, Player.HistoryRound)
        end,
        can_trigger = function(self, event, target, player, data)
            return player:hasSkill(camouflage.name) and player:usedSkillTimes(camouflage.name, Player.HistoryRound) < 2 and not player:isKongcheng() and data.card and data.card.suit ~= Card.NoSuit
        end,
        on_cost = function(self, event, target, player, data)
            local room = player.room
            if #table.filter(player:getCardIds("h"), function(id)
                    local card = Fk:getCardById(id)
                    return card.suit == data.card.suit and not HY.IsCardPublicized(card)
                end) > 0 then
                return room:askToSkillInvoke(player, {
                    skill_name = camouflage.name,
                    prompt = "camouflage_prompt::" .. target.id .. ":" .. data.card:getSuitString(true)
                })
            else
                HY.FakeThinking(room, player, camouflage.name)
            end
        end,
        on_use = function(self, event, target, player, data)
            local room = player.room
            HY.SetCardPublicize(room, table.filter(player:getCardIds("h"), function(id)
                return Fk:getCardById(id).suit == data.card.suit
            end))
            data:preventDamage()
        end,
    })
    local under_water = fk.CreateSkill {
        name = "under_water",
    }
    under_water:addEffect(fk.EventPhaseStart, {
        anim_type = "drawcard",
        can_trigger = function(self, event, target, player)
            return player:hasSkill(under_water.name) and player.phase == Player.Discard and target == player and #player:getCardIds("h") > 0
        end,
        on_cost = function(self, event, target, player, data)
            return player.room:askToSkillInvoke(player, {
                skill_name = under_water.name,
                prompt = "under_water_prompt"
            })
        end,
        on_use = function(self, event, target, player)
            local room = player.room
            room:recastCard(player:getCardIds("h"), player, under_water.name)
            room:drawCards(player, 1, under_water.name)
            room:addPlayerMark(player, "under_water-phase", 2)
        end,
    })
    under_water:addEffect("maxcards", {
        correct_func = function(self, player)
            if player:hasSkill("under_water") then
                return player:getMark("under_water-phase")
            end
        end
    })
    extension:loadSkillSkels { camouflage, under_water }
    hy_kawashiro_nitori:addSkill("camouflage")
    hy_kawashiro_nitori:addSkill("under_water")
    Fk:loadTranslationTable {
        ["hy_kawashiro_nitori"] = "河城荷取",
        ["#hy_kawashiro_nitori"] = "河川科学家",
        ["illustrator:hy_kawashiro_nitori"] = "ちー",
        ["designer:hy_kawashiro_nitori"] = "黑曜人形",
        ["cv:hy_kawashiro_nitori"] = "",

        ["camouflage"] = "迷彩",
        [":camouflage"] = "每轮限两次，一名角色受到伤害时，你可以<a href='hy_card_publicize'>明置</a>所有与造成伤害的牌相同花色的手牌并防止此伤害。",
        ["camouflage_prompt"] = "迷彩：你可以明置所有%arg手牌并防止%dest受到伤害",
        ["camouflage_prompt_failed"] = "迷彩：没有可以明置的%arg手牌",
        ["camouflage_nosuit_prompt"] = "迷彩：你可以重铸所有手牌",

        ["under_water"] = "潜居",
        [":under_water"] = "弃牌阶段开始时，你可以重铸所有手牌并摸一张牌，然后本阶段你的手牌上限+2。",
        ["under_water_prompt"] = "潜居：你可以重铸所有手牌并摸一张牌",
    }
end
